package com.booktrade.mapper;

import com.booktrade.entity.OrderItems;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * <p>
 * 订单详情表，存储订单中包含的每本书籍的信息 Mapper 接口
 * </p>
 */
public interface OrderItemsMapper extends BaseMapper<OrderItems> {
    /**
     * 根据订单ID查询订单项
     */
    @Select("SELECT * FROM order_items WHERE order_id = #{orderId}")
    List<OrderItems> selectByOrderId(Integer id);
}
